Get the First Row of Pandas using iat[]
This function takes a row and column indexes to display data in the Dataframe. Here, we will see the program to get the first row of the dataset.
Python3
# import pandas module import pandas as pd # get first row using iat() function of # first row 2 nd column print (data.iat[ 0 , 1 ]) # get first row using iat() function of # first row 1 st column print (data.iat[ 0 , 0 ]) # get first row using iat() function of # first row 3 rd column print (data.iat[ 0 , 2 ]) |
Output:
sravan 7058 java
How to Get First Row of Pandas DataFrame?
In this article, we will discuss how to get the first row of the Pandas Dataframe